package com.mc.lp.database.dao.impl;

import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.mc.lp.database.dao.IUserDAO;
import com.mc.lp.database.entity.UserEntity;
import com.mc.lp.database.exception.ConcurrentAccessException;

@Repository
public class UserDAOImpl extends AbstractGenericHibernateDAO<UserEntity, Long, IUserDAO> implements
		IUserDAO {


	public void removeUserByRole(String roleId) {

	}

	public UserEntity findById(Long id) throws DataAccessException {
		return (UserEntity) get(id);
	}

	public void deleteById(Long id) throws DataAccessException {

	}

	public void findUserById(Long id) throws DataAccessException {

	}

	public void listAllActiveUsers() throws DataAccessException {

	}

	public void saveUser(UserEntity user) throws DataAccessException {

		try {
			saveOrUpdate(user);
		} catch (ConcurrentAccessException e) {
			
			e.printStackTrace();
		}
	}

}
